package com.example.enums;
 
public enum ApiEnum {
	ASSET("资产标签","asset"),
	ISSUE("事项标签","issue"),;
	
	private String type;
	
	private String name;
	
	ApiEnum(String type,String name){
		this.type = type;
		this.name = name;
	}
 
	public String getType() {
		return type;
	}
 
	public void setType(String type) {
		this.type = type;
	}
 
	public String getName() {
		return name;
	}
 
	public void setName(String name) {
		this.name = name;
	}
	
	public static String getNameByType(String type){
		ApiEnum[] enums = ApiEnum.values();
		for(ApiEnum api : enums){
			if(api.getType().equals(type)){
				return api.getName();
			}
		}
		
		return null;
	}
}